/*
   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Library General Public
   License version 2 as published by the Free Software Foundation.

   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Library General Public License for more details.

   You should have received a copy of the GNU Library General Public License
   along with this library; see the file COPYING.LIB.  If not, write to
   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
   Boston, MA 02110-1301, USA.
*/

#ifndef LAP_H
#define LAP_H
#include "garmin.h"
#include "position.h"
#include "track.h"
#include <QtCore>

class Lap
{
public:
  Lap();
  Lap(D1015* r);

  QString toString();
  
  uint16 getIndex();
  void setIndex(uint16 val);
  QTime getStart_time();
  void setStart_time(QTime val);
  QTime getTotal_time();
  void setTotal_time(QTime val);
  QDate getDate();
  float32 getTotal_dist();
  void setTotal_dist(float32 val);
  float32 getMax_speed();
  void setMax_speed(float32 val);
  Position getBegin();
  void setBegin(Position val);
  Position getEnd();
  void setEnd(Position val);
  uint16 getCalories();
  void setCalories(uint16 val);
  uint8 getAvg_heart_rate();
  void setAvg_heart_rate(uint8 val);
  uint8 getMax_heart_rate();
  void setMax_heart_rate(uint8 val);
  uint8 getIntensity();
  void setIntensity(uint8 val);
  uint8 getAvg_cadence();
  void setAvg_cadence(uint8 val);
  uint8 getTrigger_method();
  void setTrigger_method(uint8 val);

  Track getTrack();
  void  setTrack(Track t);


private:
  uint16                       index;
  uint16                       unused;
  QTime                        start_time;
  QDate                        start_date;
  QTime                        total_time;
  float32                      total_dist;
  float32                      max_speed;
  Position                     begin;
  Position                     end;
  uint16                       calories;
  uint8                        avg_heart_rate;
  uint8                        max_heart_rate;
  uint8                        intensity;
  uint8                        avg_cadence;
  uint8                        trigger_method;
  Track                        track;
};

#endif // LAP_H
